Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> Date and time: <input type="datetime-local" id="myLocalDate" min="2000-10-06T22:22:55" max="2014-11-16T21:25:33"> <p>Click the button to change the value of the min attribute of the local datetime field.</p> <button onclick="myFunction()">Try it</button> <p><strong>Note:</strong> input elements with type="datetime-local" are not supported in Internet Explorer or Firefox.</p> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myLocalDate").min = "2006-05-05T16:15:23"; document.getElementById("demo").innerHTML = "The value of the min attribute was changed from '2000-10-06T22:22:55' to '2006-05-05T16:15:23'."; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_datetime-local_min2 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:32:44 GMT --> </html>
Result:
Try it Yourself - © w3schools.com